/*
 * @Author: life 2145887855@qq.com
 * @Date: 2025-05-21 13:30:18
 * @LastEditors: life 2145887855@qq.com
 * @LastEditTime: 2025-05-22 10:31:03
 * @FilePath: \vue2024\src\router\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { createRouter, createWebHistory } from 'vue-router';
// 引入组件
import loginView from '../view/loginView.vue';
import orderDetail from '../view/orderDetail.vue';
import favorite from '../view/favoriteView.vue';
import register from '../view/registerView.vue';
import product from '../view/productView.vue'
import center from '../view/userCenter.vue'
import order from '../view/orderView.vue'
import favoriteDetail from "../view/favoriteDetailView.vue"
import { compile } from 'vue';
// 更多组件引入类似上述方式

const routes = [
    //app登录界面
    {
        path: '/',
        name: 'loginView',
        component: loginView
    },
    //app注册界面
    {
        path: '/register',
        name: 'register',
        component: register
    },
    //商品详情界面
    {
        path: '/orderDetail',
        name: 'orderDetail',
        component: orderDetail
    },
    //商品页面
    {
        path: '/product',
        name: 'product',
        component: product
    },
    //我的收藏
    {
        path: '/favorite',
        name: "favorite",
        component: favorite
    },
    //收藏详情页面
    {
        path: '/favoriteDetail',
        name: "favoriteDetail",
        component: favoriteDetail
    },
    //个人中心
    {
        path: '/center',
        name: "center",
        component: center
    },
    //订单页面
    {
        path: '/order',
        name: "order",
        component: order
    },
];

const router = createRouter({
    history: createWebHistory(),
    routes
});

export default router;
    